package com.stenio.fancat.mapper.baby;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.stenio.fancat.domain.baby.BabyAccount;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BabyAccountMapper extends BaseMapper<BabyAccount> {

    BabyAccount selectByBid(String babyId);

    Integer modifyBabyInfo(BabyAccount babyAccount);

    //修改金额
    Integer modifyCandy(@Param("candy") Integer candy, @Param("babyId") String babyId);

    Integer subtractCandy(@Param("candy") Integer candy, @Param("babyId") String babyId);

    List<BabyAccount> selectBabyInfo(Pagination page,BabyAccount babyAccount);
}
